# -*- coding: UTF-8 -*-
# server_assets
# @File : Singleton.py
# @Date : 2023-08-30
# @Author  : wuzhouhai
# @Desc:
import KBEngine
from KBEDebug import *

class Singleton(type):
    """Singleton Metaclass"""

    def __init__(cls, name, bases, dic):
        super(Singleton, cls).__init__(name, bases, dic)
        cls.instance = None

    def __call__(cls, *args, **kwargs):
        if cls.instance is None:
            cls.instance = super(Singleton, cls).__call__(*args, **kwargs)
        return cls.instance
